#region (c) 2009 Abdullin.com and Contributors

// Copyright (c) 2009 Abdullin.com and Contributors
// Site: http://abdullin.com/ncouch
// This code is released under the terms of the new BSD licence

#endregion

using NUnit.Framework;

namespace NCouch.Synthetic
{
	public abstract class CouchFixture
	{
		protected CouchServer Server { get; private set; }
		protected CouchDatabase Database { get; private set; }
		protected string DatabaseName { get; private set; }


		[TestFixtureSetUp]
		public void FixtureSetUp()
		{
			DatabaseName = GlobalSetup.TestPrefix + GetType().Name.ToLowerInvariant();
			Server = GlobalSetup.TestServer;
			Database = GlobalSetup.ConnectToDatabase(DatabaseName);
			Server.CreateDatabase(DatabaseName);
		}
	}
}